package cn.edu.gdut.deepcode.enums;

import cn.edu.gdut.deepcode.constant.GlobalConstant;
import com.baomidou.mybatisplus.annotation.EnumValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
@ApiModel(value = "操作类型枚举",description = GlobalConstant.OPERATION_TYPE_ENUM_DESC)
public enum OperationTypeEnum {
    INSERT("新增操作",1),DELETE("删除操作",2),UPDATE("修改操作",3);

    @ApiModelProperty("操作描述")
    private final String desc;
    @ApiModelProperty("操作标识")
    @EnumValue
    private final Integer flag;
    OperationTypeEnum(String desc,Integer flag){
        this.desc=desc;
        this.flag=flag;
    }
}
